package com.cortex.carambola.view;

import com.cortex.carambolasummary.R;

import android.content.Context;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.ScrollView;

public class CortexScrollView extends ScrollView {
	
	private OnScrollChangedListener onScrollChangedListener;
	
	public CortexScrollView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public CortexScrollView(Context context) {
		super(context);
	}
	@Override
	protected void onFinishInflate() {
		// TODO Auto-generated method stub
		super.onFinishInflate();
		init();
		initHanlers();
	}
	private void init(){
	
	}
	private void initHanlers(){
		
	}
	
	public void setOnScrollChangedListener(
			OnScrollChangedListener onScrollChangedListener) {
		this.onScrollChangedListener = onScrollChangedListener;
	}
	@Override
	protected void onScrollChanged(int l, int t, int oldl, int oldt) {
		// TODO Auto-generated method stub
		super.onScrollChanged(l, t, oldl, oldt);
		if(onScrollChangedListener != null){
			onScrollChangedListener.scrollChanged(l, t, oldl, oldt);
		}
	}
	
	
	public interface OnScrollChangedListener{
		void scrollChanged(int l, int t, int oldl, int oldt);
	}
}
